<template>
  <div>
    <h3>1111111111111111111111111111111222机构管理</h3>
    <el-card>
      <el-tree :data="data" :props="defaultProps" @node-click="handleNodeClick"></el-tree>
    </el-card>
  </div>
</template>

<script>

import { GetListApi } from '@/api/instiution'

export default {

  components: {},
  props: {},
  data () {
    // 这里存放数据
    return {
      data: [],
      defaultProps: {
        children: 'children',
        label: 'label'
      }

    }
  },
  // 计算属性 类似于 data 概念
  created () {
    this.getList()
  },
  methods: {
    handleNodeClick (data) {
      console.log(data)
    },
    async getList () {
      const res = await GetListApi()
      console.log(res)
      // this.data = res.data
      // console.log(this.data)
    }
  }

}

</script>

<style scoped>
</style>
